package com.jacklin.utils;

import com.jacklin.VO.ResultVO;

/**
 * @Author:JackLin
 * @Create 2019/3/27 10:14
 */
public class ResultVOUtil {

    //返回结果成功
    public static ResultVO success(Object object){
        ResultVO resultVO = new ResultVO();
        resultVO.setCode(0);
        resultVO.setMsg("成功");
        resultVO.setData(object);
        return resultVO;
    }

    //返回结果为null，什么都不传
    public static ResultVO success(){
       return success(null);
    }

    public static ResultVO error(Integer code,String msg){
        ResultVO resultVO = new ResultVO();
        resultVO.setCode(code);
        resultVO.setMsg(msg);
        return resultVO;
    }
}
